package cn.edu.ldu.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.DatagramPacket;

public class L {

    public static Logger OK(Object s, Class c){
        Logger log = LoggerFactory.getLogger(c);
        log.info(String.valueOf(s));
        return log;
    }

    public static Logger OK(DatagramPacket packet, Class c){
        Logger log = LoggerFactory.getLogger(c);
        log.info("==>data:"+ Translate.ByteToObject(packet.getData()));
        log.info("==>length:"+ packet.getLength());
        log.info("==>address:"+ packet.getSocketAddress());
        return log;
    }

}
